package cn.edu.fzu.homemaking.wallet.domain.enums;

public enum ChargeModeEnum {

    IN(0, "入账"),
    OUT(1, "出账");

    private final int    value;
    private final String desc;

    ChargeModeEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }


    public int getValue() {
        return value;
    }


    public String getDesc() {
        return desc;
    }


    public static ChargeModeEnum parse(int value) {
        switch (value) {

            case 0:
                return IN;
            case 1:
                return OUT;
            default:
                return null;
        }
    }

}
